package com.example.wisdomclassroomapi.domain.service;

import com.example.wisdomclassroomapi.domain.entity.CourseSubjectEntity;
import com.example.wisdomclassroomapi.domain.repository.CourseSubjectRepository;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Package: com.example.wisdomclassroomapi.domain.service
 * @Description: <>
 * @Author: scholes
 * @CreateDate: 2022-04-18
 * @UpdateUser: scholes
 * @UpdateDate: 2022-04-18
 * @UpdateRemark: <>
 * @Version: 1.0
 */
@Service
public class CourseSubjectDomainService {
@Resource
private CourseSubjectRepository courseSubjectRepository;

public void add(CourseSubjectEntity entity) {
    courseSubjectRepository.add(entity);
        }

public CourseSubjectEntity findById(String id) {
        return courseSubjectRepository.findById(id);
        }

public int updateById(CourseSubjectEntity entity) {
        return courseSubjectRepository.updateById(entity);
        }

public int deleteById(String id) {
        return courseSubjectRepository.deleteById(id);
        }

public IPage<CourseSubjectEntity> page(CourseSubjectEntity entity,IPage page) {
        return courseSubjectRepository.page(entity,page);
        }

public List<CourseSubjectEntity> list(CourseSubjectEntity entity) {
        return courseSubjectRepository.list(entity);
        }

}